<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>编辑</title>
<link href="/assets/bui/css/bs3/dpl.css" rel="stylesheet">
<link href="/assets/bui/css/bs3/bui.css" rel="stylesheet">
</head>
<body>
  <div class="demo-content">
    
    <!-- 表单页 ================================================== --> 
    <div class="row">
      <div class="span24">
        <ul class="breadcrumb">
          <li>
            <a href="#">首页</a> <span class="divider">/</span>
          </li>
          <li>
            <a href="#">商家管理</a> <span class="divider">/</span>
          </li>
          <li class="active">编辑</li>
        </ul>
        <hr>
        <form id="J_Form" class="form-horizontal" method="post" action="update">
        <input type="hidden" name=".table" value="#(table)" />
        	#for(c : cols)
        	#if(c.column_name=="id")
        	<input type="hidden" name="id" value="#[[#(obj.id)]]##" />
        	#elseif(c.column_name=="add_time"||c.column_name=="update_time"||c.column_name=="opby")
        	#elseif(c.data_type=="timestamp"||c.data_type=="datetime"||c.data_type=="date")
        	<div class="control-group">
              <label class="control-label"><s>*</s>#(c.column_comment)：</label>
              <div class="controls">
                <input type="text" class="calendar" name="#(c.column_name)" value="#[[#(obj.]]##(c.column_name))" data-rules="{required:true}">
              </div>
            </div>
            #elseif(c.data_type=="text")
            <div class="control-group">
		        <label class="control-label">#(c.column_comment)：</label>
		        <div class="controls  control-row-auto">
		          <textarea name="#(c.column_name)" placeholder="填写#(c.column_comment)" id="#(c.column_name)" class="control-row4 input-large">#[[#(obj.]]##(c.column_name))</textarea>
		        </div>
		      </div>
		    #elseif(c.column_name=="json")
            <div class="control-group">
		        <label class="control-label">#(c.column_comment)：</label>
		        <div class="controls  control-row-auto">
		          <textarea name="#(c.column_name)" placeholder="Json格式数据" id="#(c.column_name)" class="control-row4 input-large">#[[#(obj.]]##(c.column_name))</textarea>
		        </div>
		      </div>
		    #else
            <div class="control-group">
              <label class="control-label"><s>*</s>#(c.column_comment)：</label>
              <div class="controls">
                <input name="#(c.column_name)" type="text"  placeholder="填写#(c.column_comment)" value="#[[#(obj.]]##(c.column_name))" class="input-large" data-rules="{required : true}">
              </div>
            </div>
            #end
            #end
            
            <hr>
            <div class="form-actions span5 offset3">
              <button id="btnSearch" type="submit" class="button button-primary">保存信息</button>
              <button onclick="closePage();" type="button" class="button ">关闭本页</button>
            </div>
        </form> 
      </div>
    </div>  
    <script src="/assets/bui/js/jquery-1.8.1.min.js"></script>
    <script src="/assets/bui/js/seed-min.js"></script>  
    <script type="text/javascript">
      BUI.use('bui/form',function  (Form) {
        new Form.Form({
          srcNode : '#J_Form'
        }).render();
      });
      function closePage(){
    	  top.topManager.closePage();
      }
    </script>
<!-- script end -->
  </div>
</body>
</html>    